﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using ChiDao.Component.Utils;
using ChiDao.Business.Service.Helper.Logging;
using ChiDao.Business.Service.Impl;
using ChiDao.Site.Models;
using ChiDao.Business.Service;
using System.ComponentModel;
using ChiDao.Business.Models.Account;
using Ext.Net.MVC;
using Ext.Net;

namespace ChiDao.Site.Web.Controllers
{
    [DirectController]
    public class DemoController : BaseController
    {
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult RenderWindow()
        {
            return new Ext.Net.MVC.PartialViewResult { ViewName = "Window" };
        }

        [DirectMethod]
        public ActionResult CloseWindow()
        {
            X.GetCmp<Window>("win234").Close();
            return this.Direct();
        }
    }
}